<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
    <style>
        img{
            width: 300px;
            height: 400px;
        }
    </style>
</head>

<body>
    <div id="app">
        <button v-show = 'count>0' @click='count--'>上一页</button>
        <img :src="arr[count]" alt="111"> <!-- v-bind -->
        <button v-show = 'count<arr.length - 1' @click='count++'>下一页</button>

    </div>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                count : 0,
                arr: [
                    './img/1.jpg',
                    './img/2.jpg',
                    './img/3.jpg',
                    './img/4.jpg',
                    './img/5.jpg',
                    './img/6.jpg',
                    './img/7.jpg',
                    './img/8.jpg',
                    './img/9.jpg',
                    './img/10.jpg',
                ]
            }
        });

    </script>
</body>

</html>